<script type="text/javascript">
	function toggle(source) {
	  checkboxes = document.getElementsByName('selectedRows');
	  for(var i in checkboxes)
	    checkboxes[i].checked = source.checked;
	}
</script>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<%@taglib prefix="sj" uri="/struts-jquery-tags"%>


<s:form name="formBody" id="formBody">

<s:hidden name="start"/>
<s:hidden name="count"/>
<s:hidden name="orderBy"/>
<s:hidden name="ascDesc"/>
<s:hidden name="previousPage"/>
<s:hidden name="gotoPage"/>
<s:hidden name="actionMethod" value="%{actionMethod}"/>
<s:token/>

<div class="header"><span><span class="ico gray administrator"></span>Jadwal Tanda Tangan Hari Ini</span>
</div><!-- End header -->	
<div class="content" >
	
		<!-- Third / Half column-->
		<div class="widgets">
				<div class="section" >
					<label>Nama Klien</label>
					<div><s:textfield cssClass="large" name="namaKlien" labelposition="left" maxlength="45" id="name" autocomplete="off"/></div>
					
					<div class="section last">
						<!-- a class="uibutton icon forward confirm" title="Cari Sertifikat" rel="1" >cari</a-->
						<s:submit action="PenjadwalanKlienAction_listToday" value="Cari" cssClass="uibutton icon" cssStyle="width: 100px;"/> 
						<!-- a href="PersetujuanKlienAction_list.do?" title="Cari Sertifikat" class="uibutton icon forward confirm">Cari</a-->
					</div>
				</div>
		</div><!-- End Third / Half column-->
	
   <!-- clear fix -->
<div class="clear"></div>


		<div class="tableName">
			<div style="text-align:left; margin-top: 20px;  float:left;">
				Hari Ini : <s:date name="todayDate" format="EEEE, dd MMMM yyyy"/>
			</div>
			<div style= "text-align:right; margin-top: 20px;">
							<!-- a class="uibutton icon special answer" style="text-align:right;" >tolak</a-->
							<s:submit action="PenjadwalanKlienAction_saveToday" value="Sudah Tanda Tangan" cssClass="uibutton icon forward confirm" cssStyle="text-align:right;"/>							
			</div>
			<div class="clear"></div>
				
			<table class="display data_table1">
				<thead>
					<tr>
						<th><div class="th_wrapp"><s:text name="label.no"/></div></th>
						<th><input type="checkbox" onClick="toggle(this)" /> </th>
						<th style="text-align:left">Nama Klien</th>
						<th>Tempat</th>
						<th>Waktu</th>
						<th>List Akta</th>
						<th>Status</th>
						<th><div class="th_wrapp">Action</div></th>
					</tr>
				</thead>
				<tbody>
					<s:iterator value="listJadwalToday" status="sequence">
					<tr class="odd gradeX">
					    <td><s:property value="%{start+#sequence.index+1}"/></td>
						<td><s:checkbox name="selectedRows" fieldValue="%{@com.lemurian.bankdata.lite.utils.GlobalFunction@encodeParameter(id)}"/></td>
						<td style="text-align:left">
							<span class="tip" >
								<a href="DetailKlienAction_detail.do?id=<s:property value="%{@com.lemurian.bankdata.lite.utils.GlobalFunction@encodeParameter(client.id)}"/>&prev=PenjadwalanKlienAction_listToday" title="Detail"><s:property value="client.debitur.name"/></a>
							</span>
						</td>
						<td><s:property value="place"/></td>
						<td><s:date name="signatureDate" format="HH:mm"/></td>
						<td>
							<ul>
								<s:iterator value="client.clientCertificates">
									<li><s:property value="certificateType.name"/><br/></li>
								</s:iterator>
							</ul>
						</td>
						<td>
							<s:if test="signatureStatus!= null && signatureStatus == true">
								<span class="tip" >
									<a href="#" title="Sudah Tanda Tangan"><img src="images/icon/color_18/checkmark2.png"></a>
								</span>
							</s:if>
							<s:else>
								<span class="tip" >
									<a href="#" title="Belum Tanda Tangan"><img src="images/icon/color_18/cross.png"></a>
								</span>
							</s:else>
						</td>
						<td class="center">
                         	<span class="tip" >
                            	<a href="PenjadwalanKlienAction_ubahJadwal.do?id=<s:property value="%{@com.lemurian.bankdata.lite.utils.GlobalFunction@encodeParameter(id)}"/>" title="Ubah Jadwal" ><img src="images/icon/color_18/clock.png" ></a>
                         	</span>
						</td>
					</tr>
					</s:iterator>
				</tbody>
			</table>
			
			<div>
				<s:property value="%{pagerItem}" escape="false"/>
				<div class="clear"></div>
			</div>
		
		</div>
	
   <!-- clear fix -->
<div class="clear"></div>

</div><!-- End content -->
</s:form>